import Vue from 'vue'
import App from './App.vue'
import Main from '../src/components/Main'
import router from './router'
import $ from 'jquery'
import axios from 'axios'

//引入bootstrap4
import 'bootstrap/dist/js/bootstrap.min'
import 'bootstrap/dist/css/bootstrap.min.css'
//引入图标
import 'font-awesome/css/font-awesome.min.css'

//引入Element UI
import ElementUI from 'element-ui';
import './plugins/element'
import 'element-ui/lib/theme-chalk/index.css';
//引入vue-resource
import VueResource from 'vue-resource'

//引入全局样式
import './assets/css/global.css'

//带上token
axios.interceptors.request.use(config=>{
  //比如是否需要设置 token
  config.headers.token=window.sessionStorage.getItem('token');
  // console.log(config);
  return config;
})



//全局注册
Vue.use(VueResource)

//应用插件
Vue.use(ElementUI);
Vue.prototype.$ajax=axios
Vue.prototype.$jquery=$
Vue.config.productionTip = false



new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
